/**
 * Created by 何雨锋 on 2020/11/6.
 */
/**
 *  存放 用户 数据
 * **/
import * as types from '../mutation-type';
// initial state
const state = {
  stateBaseUrl:'',
  saveisBs:'',
};

// getters
const getters = {
  userInfo(state) {
    return state.name;
  },
};

// actions
// 异步方法用actions
// actions不能直接修改全局变量，需要调用commit方法来触发mutation中的方法
const actions = {

  SaveisBs(context, payload) {
    state.saveisBs = payload;
  },

};

// mutations
const mutations = {
  [types.SET_NUM](state, all) { //设置参数
    state.all = all;
  },

};

export default {
  namespaced: true,
  state,
  getters,
  actions,
  mutations,
};
